package org.learn.test;
import java.util.Scanner;
public class NestingExercise02 {
    public static void main(String[] args) {
       Scanner myScanner = new Scanner(System.in);
       System.out.println("请输入月份");
       int month = myScanner.nextInt();
        Scanner myScanner1 = new Scanner(System.in);
        System.out.println("请输入年龄");
        int age = myScanner1.nextInt();
       if(month >= 4 & month <= 10){
          if(age > 18 & age < 60){
              System.out.println(60);
          }else if(age < 18){
              System.out.println(30);
          }else if(age > 60){
              System.out.println(20);
          }
       }else if(month > 0 & month < 13){
           if(age > 18 & age < 60){
               System.out.println(40);
           }else{
               System.out.println(20);
           }
       }
       else{
           System.out.println("你输入的月份有误");
       }

    }
}
